<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateYsBookreviewTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('bookreview', function(Blueprint $table)
		{
			$table->bigInteger('id', true)->comment('主键id');
			$table->bigInteger('uid')->comment('关联用户id');
			$table->string('book_num', 32)->comment('关联书籍编号为空不关联');
			$table->string('title')->nullable()->comment('评论标题');
			$table->tinyInteger('status')->nullable()->default(0)->comment('评论状态0为正常1为删除');
			$table->text('content')->nullable()->comment('评论内容');
			$table->integer('comment_time')->comment('评论时间');
			$table->tinyInteger('recommend')->nullable()->default(0)->comment('精推荐,1为推荐');
			$table->tinyInteger('top')->nullable()->default(0)->comment('是否置顶1为置顶');
			$table->tinyInteger('author_reply')->nullable()->default(0)->comment('作者是否回复是为1');
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('bookreview');
	}

}
